package se.sics.drsm.ports.statemachine.events;

import se.sics.drsm.model.DRSMAddress;
import se.sics.kompics.Event;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: shadid
 * Date: 4/4/13
 * Time: 10:07 PM
 * To change this template use File | Settings | File Templates.
 */
public class UpdatePeers extends Event {

    private final DRSMAddress leader;
    private final List<DRSMAddress> peerList;

    public UpdatePeers(DRSMAddress leader, List<DRSMAddress> peerList) {
        this.leader = leader;
        this.peerList = peerList;
    }

    public DRSMAddress getLeader() {
        return leader;
    }

    public List<DRSMAddress> getPeerList() {
        return peerList;
    }

    @Override
    public String toString() {
        return "UpdatePeers{" +
                "leader=" + leader +
                ", peerList=" + peerList +
                '}';
    }
}
